package preprocessing;

import java.util.*;


public class LexicalAnalysis {
	
	private ArrayList<String> infoNeeds = null;
	private String [] words = null;
	private String delimiters =null;
	public LexicalAnalysis()
	{
		infoNeeds = new ArrayList<String>();
		delimiters= "[., ]";
	}
	public  ArrayList<String> tokenizer(String userInfoNeeds)
	{
		try
		{
			words = userInfoNeeds.split(delimiters);
			for(String word:words)
			{
				infoNeeds.add(word.toLowerCase());
			}
		}
		catch (Exception e) {
			System.out.println(e.getMessage());
		}
		return infoNeeds;
	}

}
